﻿<Window x:Class="TicketServer.ImportWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:eT="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"
		xmlns:t="clr-namespace:TicketServer"
		xmlns:lex="http://wpflocalizeextension.codeplex.com"
		lex:LocalizeDictionary.DesignCulture="en"
		lex:ResxLocalizationProvider.DefaultAssembly="TicketServer"
		lex:ResxLocalizationProvider.DefaultDictionary="Import"
		Title="{lex:LocText WindowTitle}"
		Width="655"
		Height="765"
		MinWidth="450"
		MinHeight="700"
		Closing="Window_Closing"
		DataContext="{Binding RelativeSource={RelativeSource Self}}"
		Icon="/TicketServer;component/Icons/Large/txt.png"
		ResizeMode="CanResize"
		ShowInTaskbar="False"
		WindowStartupLocation="CenterOwner"
		WindowStyle="SingleBorderWindow">
	<eT:BusyIndicator x:Name="busyIndicator">
		<eT:BusyIndicator.BusyContentTemplate>
			<DataTemplate>
				<StackPanel Margin="4">
					<TextBlock HorizontalAlignment="Center"
							   FontWeight="Bold"
							   Text="{lex:LocText ImportingTickets}" />
					<StackPanel Margin="4">
						<TextBlock x:Name="textBlockOverlayStatus" Text="{Binding Text, ElementName=textBlockStatus}" />
						<ProgressBar Height="15"
									 Margin="0 5 0 0"
									 Value="{Binding Value,
													 ElementName=progressBarStatus}" />
					</StackPanel>
				</StackPanel>
			</DataTemplate>
		</eT:BusyIndicator.BusyContentTemplate>
		<eT:BusyIndicator.ProgressBarStyle>
			<Style TargetType="ProgressBar">
				<Setter Property="Visibility" Value="Collapsed" />
			</Style>
		</eT:BusyIndicator.ProgressBarStyle>

		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition />
				<ColumnDefinition />
				<ColumnDefinition />
				<ColumnDefinition Width="34" />
			</Grid.ColumnDefinitions>

			<Grid.RowDefinitions>
				<RowDefinition Height="45" />
				<RowDefinition Height="34" />
				<RowDefinition Height="25" />
				<RowDefinition Height="45" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
				<RowDefinition Height="34" />
			</Grid.RowDefinitions>

			<TextBlock Grid.Row="0"
					   Grid.Column="0"
					   Grid.ColumnSpan="4"
					   Margin="10,3"
					   VerticalAlignment="Bottom"
					   FontSize="14"
					   Text="{lex:LocText ImportDescriptionText}"
					   TextWrapping="Wrap" />

			<TextBlock Grid.Row="1"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockFile}" />
			<TextBox x:Name="textBoxFile"
					 Grid.Row="1"
					 Grid.Column="1"
					 Grid.ColumnSpan="2"
					 Margin="5"
					 TextChanged="textBoxFile_TextChanged" />
			<Button x:Name="buttonBrowse"
					Grid.Row="1"
					Grid.Column="3"
					Margin="5"
					Click="buttonBrowse_Click"
					Content="..." />

			<CheckBox x:Name="checkBoxHeader"
					  Grid.Row="2"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="10,0,0,0"
					  VerticalAlignment="Center"
					  Content="{lex:LocText CheckBoxHasHeader}"
					  IsChecked="True" />

			<TextBlock Grid.Row="3"
					   Grid.Column="0"
					   Grid.ColumnSpan="4"
					   Margin="10,3"
					   VerticalAlignment="Bottom"
					   FontSize="14"
					   Text="{lex:LocText ImportColumnText}"
					   TextWrapping="Wrap" />

			<TextBlock Grid.Row="4"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockSeparator}" />
			<ComboBox x:Name="comboBoxSeparator"
					  Grid.Row="4"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEditable="True"
					  IsEnabled="False"
					  TextBoxBase.TextChanged="comboBoxSeparator_TextChanged">
				<ComboBoxItem Content="\t" Selector.IsSelected="True" />
				<ComboBoxItem Content="," />
				<ComboBoxItem Content=";" />
			</ComboBox>

			<TextBlock Grid.Row="5"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockCodeColumn}" />
			<ComboBox x:Name="comboBoxCodeColumn"
					  Grid.Row="5"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEnabled="False"
					  SelectionChanged="comboBoxColumn_SelectionChanged" />

			<TextBlock Grid.Row="6"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockNameColumn}" />
			<ComboBox x:Name="comboBoxNameColumn"
					  Grid.Row="6"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEnabled="False"
					  SelectionChanged="comboBoxColumn_SelectionChanged" />

			<TextBlock Grid.Row="7"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockStreetColumn}" />
			<ComboBox x:Name="comboBoxStreetColumn"
					  Grid.Row="7"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEnabled="False"
					  SelectionChanged="comboBoxColumn_SelectionChanged" />

			<TextBlock Grid.Row="8"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockZipColumn}" />
			<ComboBox x:Name="comboBoxZipColumn"
					  Grid.Row="8"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEnabled="False"
					  SelectionChanged="comboBoxColumn_SelectionChanged" />

			<TextBlock Grid.Row="9"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockCityColumn}" />
			<ComboBox x:Name="comboBoxCityColumn"
					  Grid.Row="9"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEnabled="False"
					  SelectionChanged="comboBoxColumn_SelectionChanged" />

			<TextBlock Grid.Row="10"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockPhoneColumn}" />
			<ComboBox x:Name="comboBoxPhoneColumn"
					  Grid.Row="10"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEnabled="False"
					  SelectionChanged="comboBoxColumn_SelectionChanged" />

			<TextBlock Grid.Row="11"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockMailColumn}" />
			<ComboBox x:Name="comboBoxMailColumn"
					  Grid.Row="11"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5"
					  IsEnabled="False"
					  SelectionChanged="comboBoxColumn_SelectionChanged" />

			<TextBlock Grid.Row="12"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Left"
					   VerticalAlignment="Bottom"
					   Text="{lex:LocText TextBlockPreview}" />

			<ListView x:Name="listViewPreview"
					  Grid.Row="13"
					  Grid.Column="0"
					  Grid.ColumnSpan="4"
					  Margin="5" />

			<TextBlock Grid.Row="14"
					   Grid.Column="0"
					   Grid.ColumnSpan="4"
					   Margin="10,3"
					   VerticalAlignment="Bottom"
					   FontSize="14"
					   Text="{lex:LocText ImportTypeText}"
					   TextWrapping="Wrap" />

			<TextBlock Grid.Row="15"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockTicketMode}" />
			<ComboBox x:Name="comboBoxTicketMode"
					  Grid.Row="15"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5">
				<t:IsOnlineComboBoxItem Content="{lex:LocText ItemOfflineTicket}"
										IsOnlineTicket="False"
										IsSelected="True" />
				<t:IsOnlineComboBoxItem Content="{lex:LocText ItemOnlineTicket}" IsOnlineTicket="True" />
			</ComboBox>

			<TextBlock Grid.Row="16"
					   Grid.Column="0"
					   Margin="5"
					   HorizontalAlignment="Right"
					   VerticalAlignment="Center"
					   Text="{lex:LocText TextBlockTicketType}" />
			<ComboBox x:Name="comboBoxTicketType"
					  Grid.Row="16"
					  Grid.Column="1"
					  Grid.ColumnSpan="2"
					  Margin="5">
				<t:TicketTypeComboBoxItem Content="{lex:LocText ItemNormalTicket}"
										  IsSelected="True"
										  TicketType="Normal" />
				<t:TicketTypeComboBoxItem Content="{lex:LocText ItemFreeTicket}" TicketType="Free" />
				<t:TicketTypeComboBoxItem Content="{lex:LocText ItemSpecialTicket}" TicketType="Special" />
			</ComboBox>

			<Button x:Name="buttonImport"
					Grid.Row="17"
					Grid.Column="0"
					Grid.ColumnSpan="4"
					Width="180"
					Margin="5"
					Click="buttonImport_Click"
					Content="{lex:LocText ButtonImport}"
					IsEnabled="False" />

			<StatusBar Grid.Row="18"
					   Grid.Column="0"
					   Grid.ColumnSpan="4"
					   Margin="0,10,0,0"
					   BorderBrush="Gray"
					   BorderThickness="0 1 0 0">
				<StatusBar.ItemsPanel>
					<ItemsPanelTemplate>
						<Grid Margin="0">
							<Grid.RowDefinitions>
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="Auto" />
							</Grid.ColumnDefinitions>
						</Grid>
					</ItemsPanelTemplate>
				</StatusBar.ItemsPanel>

				<StatusBarItem>
					<TextBlock x:Name="textBlockStatus" Text="{lex:LocText ImportStatusReady}" />
				</StatusBarItem>
				<StatusBarItem Grid.Column="1">
					<ProgressBar x:Name="progressBarStatus"
								 Width="100"
								 Height="15"
								 Visibility="Hidden"
								 Value="0" />
				</StatusBarItem>
			</StatusBar>
		</Grid>
	</eT:BusyIndicator>
</Window>
